package glemipsc.implementations;

import java.util.List;

import glemipsc.Address;

public abstract class Implementation {
	public abstract int getCharSize();
	public abstract int getShortIntegerSize();
	public abstract int getLongIntegerSize();
	public abstract int getFloatSize();
	public abstract int getDoubleSize();
	public abstract int getPointerSize();
	
	public abstract boolean isDefaultShort();
	
	public abstract int getMaximumImmediateBits();
	public abstract int getNumberOfRegisters();
	public abstract int getRegistersBits();
	public abstract int getReservedRegisters();
	public abstract Argument getStackPointerRegister();
	public abstract Argument getZeroRegister();
	public abstract Argument getReturnRegister();
	
	public abstract Argument getFreeRegister();
	public abstract void freeRegister(Argument arg);
	public abstract List<Argument> getBusyRegisters();
	
	public abstract Argument getImmediate(int n);
	
	// Instructions
	public abstract Instruction getMov(Argument dest, Argument source);
	public abstract Instruction getAdd(Argument arg1, Argument arg2, Argument arg3, boolean signed);
	public abstract Instruction getSub(Argument arg1, Argument arg2, Argument arg3, boolean signed);
	public abstract Instruction getMul(Argument arg1, Argument arg2, Argument arg3, boolean signed);
	public abstract Instruction getDiv(Argument arg1, Argument arg2, Argument arg3, boolean signed);
	public abstract Instruction getAnd(Argument arg1, Argument arg2, Argument arg3);
	public abstract Instruction getOr(Argument arg1, Argument arg2, Argument arg3);
	public abstract Instruction getXor(Argument arg1, Argument arg2, Argument arg3);
	public abstract Instruction getJal(Argument arg1);
	public abstract Instruction getJgez(Argument arg1, Argument arg2);
	public abstract Instruction getJgz(Argument arg1, Argument arg2);
	public abstract Instruction getJlez(Argument arg1, Argument arg2);
	public abstract Instruction getJlz(Argument arg1, Argument arg2);
	public abstract Instruction getJnz(Argument arg1, Argument arg2);
	public abstract Instruction getJz(Argument arg1, Argument arg2);
	public abstract Instruction getJmp(Argument arg);
	public abstract Instruction getLls(Argument arg1, Argument arg2, Argument arg3);
	public abstract Instruction getLrs(Argument arg1, Argument arg2, Argument arg3);
	public abstract Instruction getLd(Argument arg, Address addr, int size);
	public abstract Instruction getSt(Argument arg, Address addr, int size);
	public abstract Instruction getNop();
	
	public abstract Argument[] getRegisters();
}
